#pragma once
#include "cybertron/DefinesCore.hpp"
#include "cybertron/glm/vec3.hpp"
#include "cybertron/core/JsonReader.hpp"

CYBERTRON_BEGIN

struct SensorGpsImuConfig {
	vec3		Position = vec3(0.0f);
	vec3		Rotation = vec3(0.0f);
	float		HorizontalPositionError = 0.0f;
	float		VerticalPositionError = 0.0f;
	float		AttitudeError = 0.0f;
	float		VelocityError = 0.0f;
	float		AccelerationError = 0.0f;
	float		AngularVelocityError = 0.0f;
	float		HzImu = 60.0f;
	float		HzGps = 10.0f;
	float		Gravity = 9.8f;
	float		GpsSignal = 1.0f;
	bool		IsGpsOutage = false;
};

class SensorConfigUtil
{
public:
	static bool loadConfig(const cybertron::json& jsonRoot, SensorGpsImuConfig& config);
	static std::uint32_t getHashValue(const std::string& hashStr);
	static std::uint32_t getHashValue(std::uint32_t trafficFlowActorId, std::uint32_t trafficFlowActorType = 0);
};

CYBERTRON_END